home *** CD-ROM | disk | FTP | other *** search
/ QuickTime 2.0 Beta / Quicktime 2.0 Beta.iso / Programming Stuff / Interfaces / Universal Interfaces / Video.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-01-30  |  11.3 KB  |  363 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        Video.h
  3.  
  4.     Copyright:    © 1984-1993 by Apple Computer, Inc., all rights reserved.
  5.  
  6.     WARNING
  7.     This file was auto generated by the interfacer tool. Modifications
  8.     must be made to the master file.
  9.  
  10. */
  11.  
  12. #ifndef __VIDEO__
  13. #define __VIDEO__
  14.  
  15. #ifndef __QUICKDRAW__
  16. #include <Quickdraw.h>
  17. /*    #include <Types.h>                                            */
  18. /*        #include <ConditionalMacros.h>                            */
  19. /*        #include <MixedMode.h>                                    */
  20. /*            #include <Traps.h>                                    */
  21. /*    #include <QuickdrawText.h>                                    */
  22. /*        #include <IntlResources.h>                                */
  23. #endif
  24.  
  25. enum  {
  26.     mBaseOffset                    = 1,                            /*Id of mBaseOffset.*/
  27.     mRowBytes                    = 2,                            /*Video sResource parameter Id's */
  28.     mBounds                        = 3,                            /*Video sResource parameter Id's */
  29.     mVersion                    = 4,                            /*Video sResource parameter Id's */
  30.     mHRes                        = 5,                            /*Video sResource parameter Id's */
  31.     mVRes                        = 6,                            /*Video sResource parameter Id's */
  32.     mPixelType                    = 7,                            /*Video sResource parameter Id's */
  33.     mPixelSize                    = 8,                            /*Video sResource parameter Id's */
  34.     mCmpCount                    = 9,                            /*Video sResource parameter Id's */
  35.     mCmpSize                    = 10,                            /*Video sResource parameter Id's */
  36.     mPlaneBytes                    = 11,                            /*Video sResource parameter Id's */
  37.     mVertRefRate                = 14,                            /*Video sResource parameter Id's */
  38.     mVidParams                    = 1,                            /*Video parameter block id.*/
  39.     mTable                        = 2,                            /*Offset to the table.*/
  40.     mPageCnt                    = 3,                            /*Number of pages*/
  41.     mDevType                    = 4,                            /*Device Type*/
  42.     oneBitMode                    = 128,                            /*Id of OneBitMode Parameter list.*/
  43.     twoBitMode                    = 129,                            /*Id of TwoBitMode Parameter list.*/
  44.     fourBitMode                    = 130,                            /*Id of FourBitMode Parameter list.*/
  45.     eightBitMode                = 131                            /*Id of EightBitMode Parameter list.*/
  46. };
  47.  
  48. enum  {
  49.     sixteenBitMode                = 132,                            /*Id of SixteenBitMode Parameter list.*/
  50.     thirtyTwoBitMode            = 133,                            /*Id of ThirtyTwoBitMode Parameter list.*/
  51.     firstVidMode                = 128,                            /*The new, better way to do the above. */
  52.     secondVidMode                = 129,                            /* QuickDraw only supports six video */
  53.     thirdVidMode                = 130,                            /* at this time.      */
  54.     fourthVidMode                = 131,
  55.     fifthVidMode                = 132,
  56.     sixthVidMode                = 133,
  57.     spGammaDir                    = 64,
  58.     spVidNamesDir                = 65
  59. };
  60.  
  61.  
  62. // csTimingFormat values in VDTimingInfo
  63.  
  64.  
  65. //
  66.  
  67.  
  68. // look in the declartion rom for timing info
  69.  
  70. #define kDeclROMtables 'decl'
  71.  
  72.  
  73. // csConnectFlags values in VDDisplayConnectInfo
  74.  
  75.  
  76. //
  77.  
  78. enum  {
  79.     kAllModesValid                = 0,                            // All modes not trimmed by primary init are good close enough to try
  80.     kAllModesSafe                = 1,                            // All modes not trimmed by primary init are know to be safe
  81.     kReportsTagging                = 2,                            // Can detect tagged displays (to identify smart monitors)
  82.     kHasDirectConnect            = 3                                // True implies that driver can talk directly to device (e.g. serial data link via sense lines)
  83. };
  84.  
  85.  
  86. // csDisplayType values in VDDisplayConnectInfo
  87.  
  88.  
  89. //
  90.  
  91. enum  {
  92.     kUnknownConnect                = 1,
  93.     kPanelConnect                = 2,
  94.     kFixedModeCRTConnect        = 3,
  95.     kMultiModeCRT1Connect        = 4,                            // 320x200 maybe, 12" maybe, 13" (default), 16" certain, 19" maybe, 21" maybe
  96.     kMultiModeCRT2Connect        = 5,                            // 320x200 maybe, 12" maybe, 13" certain, 16" (default), 19" certain, 21" maybe
  97.     kMultiModeCRT3Connect        = 6,                            // 320x200 maybe, 12" maybe, 13" certain, 16" certain, 19" default, 21" certain
  98.     kMultiModeCRT4Connect        = 7,                            // Expansion to large multi mode (not yet used)
  99.     kModelessConnect            = 8                                // Expansion to modeless model (not yet used)
  100. };
  101.  
  102.  
  103. // csTimingFlags values in VDTimingInfoRec
  104.  
  105.  
  106. //
  107.  
  108. enum  {
  109.     kModeSafe                    = 0,                            // This mode does not need confirmation
  110.     kModeDefault                = 1                                // This is the default mode for this type of connection
  111. };
  112.  
  113. enum  {
  114. /* Control Codes */
  115.     cscReset                    = 0,
  116.     cscKillIO                    = 1,
  117.     cscSetMode                    = 2,
  118.     cscSetEntries                = 3,
  119.     cscSetGamma                    = 4,
  120.     cscGrayPage                    = 5,
  121.     cscGrayScreen                = 5,
  122.     cscSetGray                    = 6,
  123.     cscSetInterrupt                = 7,
  124.     cscDirectSetEntries            = 8,
  125.     cscSetDefaultMode            = 9,
  126.     cscSwitchMode                = 10,
  127.     cscSetSync                    = 11
  128. };
  129.  
  130. enum  {
  131. /* Status Codes */
  132.     cscGetMode                    = 2,
  133.     cscGetEntries                = 3,
  134.     cscGetPageCnt                = 4,
  135.     cscGetPages                    = 4,                            /* This is what C&D 2 calls it. */
  136.     cscGetPageBase                = 5,
  137.     cscGetBaseAddr                = 5,                            /* This is what C&D 2 calls it. */
  138.     cscGetGray                    = 6,
  139.     cscGetInterrupt                = 7,
  140.     cscGetGamma                    = 8,
  141.     cscGetDefaultMode            = 9,
  142.     cscGetCurMode                = 10,
  143.     cscGetSync                    = 11,
  144.     cscGetConnection            = 12,                            /* Return information about the connection to the display */
  145.     cscGetModeTiming            = 13                            /* Return timing info for a mode */
  146. };
  147.  
  148. #if defined(powerc) || defined (__powerc)
  149. #pragma options align=mac68k
  150. #endif
  151. struct VPBlock {
  152.     long                        vpBaseOffset;                    /*Offset to page zero of video RAM (From minorBaseOS).*/
  153.     short                        vpRowBytes;                        /*Width of each row of video memory.*/
  154.     Rect                        vpBounds;                        /*BoundsRect for the video display (gives dimensions).*/
  155.     short                        vpVersion;                        /*PixelMap version number.*/
  156.     short                        vpPackType;
  157.     long                        vpPackSize;
  158.     long                        vpHRes;                            /*Horizontal resolution of the device (pixels per inch).*/
  159.     long                        vpVRes;                            /*Vertical resolution of the device (pixels per inch).*/
  160.     short                        vpPixelType;                    /*Defines the pixel type.*/
  161.     short                        vpPixelSize;                    /*Number of bits in pixel.*/
  162.     short                        vpCmpCount;                        /*Number of components in pixel.*/
  163.     short                        vpCmpSize;                        /*Number of bits per component*/
  164.     long                        vpPlaneBytes;                    /*Offset from one plane to the next.*/
  165. };
  166. #if defined(powerc) || defined(__powerc)
  167. #pragma options align=reset
  168. #endif
  169.  
  170. typedef struct VPBlock VPBlock;
  171.  
  172. typedef VPBlock *VPBlockPtr;
  173.  
  174. #if defined(powerc) || defined (__powerc)
  175. #pragma options align=mac68k
  176. #endif
  177. struct VDEntryRecord {
  178.     Ptr                            csTable;                        /*(long) pointer to color table entry=value, r,g,b:INTEGER*/
  179. };
  180. #if defined(powerc) || defined(__powerc)
  181. #pragma options align=reset
  182. #endif
  183.  
  184. typedef struct VDEntryRecord VDEntryRecord;
  185.  
  186. typedef VDEntryRecord *VDEntRecPtr;
  187.  
  188.  
  189. /* Parm block for SetGray control call */
  190.  
  191. #if defined(powerc) || defined (__powerc)
  192. #pragma options align=mac68k
  193. #endif
  194. struct VDGrayRecord {
  195.     Boolean                        csMode;                            /*Same as GDDevType value (0=mono, 1=color)*/
  196. };
  197. #if defined(powerc) || defined(__powerc)
  198. #pragma options align=reset
  199. #endif
  200.  
  201. typedef struct VDGrayRecord VDGrayRecord;
  202.  
  203. typedef VDGrayRecord *VDGrayPtr;
  204.  
  205.  
  206. /* Parm block for SetEntries control call */
  207.  
  208. #if defined(powerc) || defined (__powerc)
  209. #pragma options align=mac68k
  210. #endif
  211. struct VDSetEntryRecord {
  212.     ColorSpec                    *csTable;                        /*Pointer to an array of color specs*/
  213.     short                        csStart;                        /*Which spec in array to start with, or -1*/
  214.     short                        csCount;                        /*Number of color spec entries to set*/
  215. };
  216. #if defined(powerc) || defined(__powerc)
  217. #pragma options align=reset
  218. #endif
  219.  
  220. typedef struct VDSetEntryRecord VDSetEntryRecord;
  221.  
  222. typedef VDSetEntryRecord *VDSetEntryPtr;
  223.  
  224.  
  225. /* Parm block for SetGamma control call */
  226.  
  227. #if defined(powerc) || defined (__powerc)
  228. #pragma options align=mac68k
  229. #endif
  230. struct VDGammaRecord {
  231.     Ptr                            csGTable;                        /*pointer to gamma table*/
  232. };
  233. #if defined(powerc) || defined(__powerc)
  234. #pragma options align=reset
  235. #endif
  236.  
  237. typedef struct VDGammaRecord VDGammaRecord;
  238.  
  239. typedef VDGammaRecord *VDGamRecPtr;
  240.  
  241. #if defined(powerc) || defined (__powerc)
  242. #pragma options align=mac68k
  243. #endif
  244. struct VDSwitchInfoRec {
  245.     unsigned short                csMode;                            /*(word) mode depth*/
  246.     unsigned long                csData;                            /*(long) functional sResource of mode*/
  247.     unsigned short                csPage;                            /*(word) page to switch in*/
  248.     Ptr                            csBaseAddr;                        /*(long) base address of page (return value)*/
  249.     unsigned long                csReserved;                        /*(long) Reserved (set to 0) */
  250. };
  251. #if defined(powerc) || defined(__powerc)
  252. #pragma options align=reset
  253. #endif
  254.  
  255. typedef struct VDSwitchInfoRec VDSwitchInfoRec;
  256.  
  257. typedef VDSwitchInfoRec *VDSwitchInfoPtr;
  258.  
  259. #if defined(powerc) || defined (__powerc)
  260. #pragma options align=mac68k
  261. #endif
  262. struct VDTimingInfoRec {
  263.     unsigned long                csTimingMode;                    // LONGINT - (long) timing mode (a la InitGDevice)
  264.     unsigned long                csTimingReserved;                // LONGINT - (long) reserved
  265.     unsigned long                csTimingFormat;                    // LONGINT - (long) what format is the timing info
  266.     unsigned long                csTimingData;                    // LONGINT - (long) data supplied by driver
  267.     unsigned long                csTimingFlags;                    // LONGINT - (long) mode within device
  268. };
  269. #if defined(powerc) || defined(__powerc)
  270. #pragma options align=reset
  271. #endif
  272.  
  273. typedef struct VDTimingInfoRec VDTimingInfoRec;
  274.  
  275. typedef VDTimingInfoRec *VDTimingInfoPtr;
  276.  
  277. #if defined(powerc) || defined (__powerc)
  278. #pragma options align=mac68k
  279. #endif
  280. struct VDDisplayConnectInfoRec {
  281.     unsigned short                csDisplayType;                    // INTEGER - (word) Type of display connected
  282.     unsigned short                csConnectTagged;                // INTEGER - (word) Display is currently "it" (tagged to identify component)
  283.     unsigned long                csConnectFlags;                    // LONGINT - (long) tell us about the connection
  284.     unsigned long                csDisplayComponent;                // LONGINT - (long) if the card has a direct connection to the display, it returns the display component here (FUTURE)
  285.     unsigned long                csConnectReserved;                // LONGINT - (long) reserved
  286. };
  287. #if defined(powerc) || defined(__powerc)
  288. #pragma options align=reset
  289. #endif
  290.  
  291. typedef struct VDDisplayConnectInfoRec VDDisplayConnectInfoRec;
  292.  
  293. typedef VDDisplayConnectInfoRec *VDDisplayConnectInfoPtr;
  294.  
  295. #if defined(powerc) || defined (__powerc)
  296. #pragma options align=mac68k
  297. #endif
  298. struct VDPageInfo {
  299.     short                        csMode;                            /*(word) mode within device*/
  300.     long                        csData;                            /*(long) data supplied by driver*/
  301.     short                        csPage;                            /*(word) page to switch in*/
  302.     Ptr                            csBaseAddr;                        /*(long) base address of page*/
  303. };
  304. #if defined(powerc) || defined(__powerc)
  305. #pragma options align=reset
  306. #endif
  307.  
  308. typedef struct VDPageInfo VDPageInfo;
  309.  
  310. typedef VDPageInfo *VDPgInfoPtr;
  311.  
  312. #if defined(powerc) || defined (__powerc)
  313. #pragma options align=mac68k
  314. #endif
  315. struct VDSizeInfo {
  316.     short                        csHSize;                        /*(word) desired/returned h size*/
  317.     short                        csHPos;                            /*(word) desired/returned h position*/
  318.     short                        csVSize;                        /*(word) desired/returned v size*/
  319.     short                        csVPos;                            /*(word) desired/returned v position*/
  320. };
  321. #if defined(powerc) || defined(__powerc)
  322. #pragma options align=reset
  323. #endif
  324.  
  325. typedef struct VDSizeInfo VDSizeInfo;
  326.  
  327. typedef VDSizeInfo *VDSzInfoPtr;
  328.  
  329. #if defined(powerc) || defined (__powerc)
  330. #pragma options align=mac68k
  331. #endif
  332. struct VDSettings {
  333.     short                        csParamCnt;                        /*(word) number of params*/
  334.     short                        csBrightMax;                    /*(word) max brightness*/
  335.     short                        csBrightDef;                    /*(word) default brightness*/
  336.     short                        csBrightVal;                    /*(word) current brightness*/
  337.     short                        csCntrstMax;                    /*(word) max contrast*/
  338.     short                        csCntrstDef;                    /*(word) default contrast*/
  339.     short                        csCntrstVal;                    /*(word) current contrast*/
  340.     short                        csTintMax;                        /*(word) max tint*/
  341.     short                        csTintDef;                        /*(word) default tint*/
  342.     short                        csTintVal;                        /*(word) current tint*/
  343.     short                        csHueMax;                        /*(word) max hue*/
  344.     short                        csHueDef;                        /*(word) default hue*/
  345.     short                        csHueVal;                        /*(word) current hue*/
  346.     short                        csHorizDef;                        /*(word) default horizontal*/
  347.     short                        csHorizVal;                        /*(word) current horizontal*/
  348.     short                        csHorizMax;                        /*(word) max horizontal*/
  349.     short                        csVertDef;                        /*(word) default vertical*/
  350.     short                        csVertVal;                        /*(word) current vertical*/
  351.     short                        csVertMax;                        /*(word) max vertical*/
  352. };
  353. #if defined(powerc) || defined(__powerc)
  354. #pragma options align=reset
  355. #endif
  356.  
  357. typedef struct VDSettings VDSettings;
  358.  
  359. typedef VDSettings *VDSettingsPtr;
  360.  
  361. #endif
  362.  
  363.